package cn.cas.mango.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;


@AllArgsConstructor
@Builder
@Data
@NoArgsConstructor
public class Message {

  private Integer code;
  @JsonInclude(JsonInclude.Include.NON_NULL)
  private Object data;
  private String msg;

  public static Message unSuccess(String message) {
    return Message.builder().code(500).msg(message).build();
  }
}
